package com.eairlv.share.auto.controller;

import com.eairlv.share.auto.entity.Result;
import com.eairlv.share.auto.entity.bo.ShareTableDbForm;
import com.eairlv.share.auto.entity.bo.ShareTableSearchForm;
import com.eairlv.share.auto.entity.vo.ShareTableDbVO;
import com.eairlv.share.auto.entity.vo.ShareTableRecordVO;
import com.eairlv.share.auto.service.ShareTableDbService;
import com.eairlv.share.auto.service.ShareTableRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author eairlv
 * @description
 * @date 14:45 2020/1/13
 */
@Slf4j
@Api(tags = "分片执行记录接口")
@RestController
@RequestMapping("/share/record")
public class ShareTableRecordController {

    @Autowired
    ShareTableRecordService recordService;

    @ApiOperation("查询分片执行记录")
    @GetMapping("/{id}")
    public Result<List<ShareTableRecordVO>> record(@PathVariable Integer id){
        return recordService.record(id);
    }
}
